package com.ruoyi.biz.service.impl;

import java.util.List;

import com.ruoyi.biz.domain.SimilarityRes;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.biz.mapper.BizSimilarityResultMapper;
import com.ruoyi.biz.domain.BizSimilarityResult;
import com.ruoyi.biz.service.IBizSimilarityResultService;

import javax.annotation.Resource;

/**
 * 查重结果Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-26
 */
@Service
public class BizSimilarityResultServiceImpl implements IBizSimilarityResultService 
{
    @Resource
    private BizSimilarityResultMapper bizSimilarityResultMapper;

    @Override
    public List<SimilarityRes> selectByWorkSubmitId(Long workSubmitId) {

        return bizSimilarityResultMapper.selectResultByWorkSubmitId(workSubmitId);
    }

    /**
     * 查询查重结果
     * 
     * @param id 查重结果主键
     * @return 查重结果
     */
    @Override
    public BizSimilarityResult selectBizSimilarityResultById(Long id)
    {
        return bizSimilarityResultMapper.selectBizSimilarityResultById(id);
    }

    /**
     * 查询查重结果列表
     * 
     * @param bizSimilarityResult 查重结果
     * @return 查重结果
     */
    @Override
    public List<BizSimilarityResult> selectBizSimilarityResultList(BizSimilarityResult bizSimilarityResult)
    {
        return bizSimilarityResultMapper.selectBizSimilarityResultList(bizSimilarityResult);
    }

    /**
     * 新增查重结果
     * 
     * @param bizSimilarityResult 查重结果
     * @return 结果
     */
    @Override
    public int insertBizSimilarityResult(BizSimilarityResult bizSimilarityResult)
    {
        bizSimilarityResult.setCreateTime(DateUtils.getNowDate());
        return bizSimilarityResultMapper.insertBizSimilarityResult(bizSimilarityResult);
    }

    /**
     * 修改查重结果
     * 
     * @param bizSimilarityResult 查重结果
     * @return 结果
     */
    @Override
    public int updateBizSimilarityResult(BizSimilarityResult bizSimilarityResult)
    {
        bizSimilarityResult.setUpdateTime(DateUtils.getNowDate());
        return bizSimilarityResultMapper.updateBizSimilarityResult(bizSimilarityResult);
    }

    /**
     * 批量删除查重结果
     * 
     * @param ids 需要删除的查重结果主键
     * @return 结果
     */
    @Override
    public int deleteBizSimilarityResultByIds(Long[] ids)
    {
        return bizSimilarityResultMapper.deleteBizSimilarityResultByIds(ids);
    }

    /**
     * 删除查重结果信息
     * 
     * @param id 查重结果主键
     * @return 结果
     */
    @Override
    public int deleteBizSimilarityResultById(Long id)
    {
        return bizSimilarityResultMapper.deleteBizSimilarityResultById(id);
    }
}
